home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: miker3@ix.netcom.com (Mike Rubenstein)
- Newsgroups: comp.lang.c
- Subject: Re: CONVERTING INTEGER TO ASCII??????
- Date: Thu, 28 Mar 1996 03:27:15 GMT
- Organization: Netcom
- Message-ID: <315a0571.135066665@nntp.ix.netcom.com>
- References: <4i17r9$2kn@maltese.eag.unisysgsg.com> <4ic9ll$cfp@news.bridge.net> <danpop.827013499@rscernix> <4iv1a6$pl2@news.bridge.net> <4jbpb2$pa9@sun001.spd.dsccc.com>
- NNTP-Posting-Host: ix-dc9-12.ix.netcom.com
- X-NETCOM-Date: Wed Mar 27 7:27:05 PM PST 1996
- X-Newsreader: Forte Agent .99d/32.182
-
- jmccarty@sun1307.spd.dsccc.com (Mike McCarty) wrote:
-
- > In article <4iv1a6$pl2@news.bridge.net>,
- > Gary Thompson <psycho@bridge.net> wrote:
- > )danpop@mail.cern.ch (Dan Pop) wrote:
- > )
- > )>In <4ic9ll$cfp@news.bridge.net> psycho@bridge.net (Gary Thompson) writes:
- > )
- > )>>buff=itoa(intvalue,buff,10); (I think...)
- > )
- > )>And you're wrong. There is no itoa function in the C language.
- > )
- > )>K&R2 contains such a function (as an example), at page 64, but it has
- > )>only two arguments :-)
- > )
- > )Then what is this... (badly copied from my C compiler)
- > )ª----------------------------------------------------------------------------
- > )ª _
- > )ª Include: <stdlib.h> _
- > )ª _
- > )ª Syntax: char *itoa( int value, char *string, int radix ); _
- > )ª char *ltoa( long value, char *string, int radix ); _
- > )ª char *ultoa( unsigned long value, char *string, int radix ); _
- > )ª _
- > )ª Returns: a pointer to <string>. _
- > )ª --
- > )ª___________________________________________________________________________ª
- >
- > [some control characters edited out and width reduced]
- >
- > This is a routine which your link library designer decided to put in.
- > It is not a standard C routine. Library designers are required to put
- > certain functionality into the library. There is (AFAIK) no
- > functionality they are required to omit. Since the C language is
- > defined by a standard, not by an implementation, implementation
- > arguments are irrelevant.
-
- Correct, but let's add that an implementation that defines itoa (or
- ltoa or ultoa) in <stdlib.h> does not conform to the standard. The
- standard does not allow an implementation to define these identifiers
- in a standard header.
-
-
- Michael M Rubenstein
-